home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / tcp / AmiSlate1_2.lha / AmiSlate / Install_AmiSlate < prev    next >
Text File  |  1995-05-24  |  4KB  |  92 lines

  1. ; Installation script for AmiSlate
  2. ; by Jeremy Friesner
  3.  
  4. (transcript "On installing AmiSlate...")
  5.  
  6. (set SlateDir
  7.     (askdir
  8.         (prompt "Where would you like to install AmiSlate??\n(A drawer named \"AmiSlate\" will be created in the directory you select)")
  9.         (help @askdir-help)
  10.         (default "AmiTCP:")
  11.     )
  12. )
  13.  
  14. (set NewDir (tackon SlateDir "AmiSlate"))
  15. (makedir (NewDir) (infos))
  16. (set MyPrompt ("Copying files to %s." NewDir))
  17.  
  18. (copyfiles
  19.     (prompt MyPrompt)
  20.     (help @copyfiles-help)
  21.     (source "")
  22.     (pattern "~(Install#?)")
  23.     (dest NewDir)
  24. )
  25.  
  26. (set AssignString ("assign SlateRexx: %s/SlateRexx\nassign SlateScripts: %s/SlateScripts\n" NewDir NewDir))
  27.  
  28. (startup "AmiSlate"
  29.         (prompt "For correct operation, AmiSlate needs two assigns to be present.  These assigns are \n\nSlateRexx: and SlateScripts:\n\n and should be assigned to the installed directories with the same names.  Do you wish me to put the appropriate assigns in your s:user-startup?")
  30.         (help "Sometimes a remote AmiSlate client will request the local one to run an ARexx macro or a AmiSlate recording.  These assigns will be the default directories for these scripts.")
  31.         (command AssignString)
  32. )
  33.  
  34. (set TestAmiTCPAssign (run "assign AmiTCP: EXISTS" (safe)))
  35.  
  36. (if (> TestAmiTCPAssign 0)
  37.     (message "\n\nAmiTCP does not appear to be set up on your system.  (Specifically, the assign AmiTCP: has not been made)  Because of this, I am unable to configure the amitcp:db/services and amitcp:db/inetd.conf files.\n\nIf you wish to use the network functions of AmiSlate, you will need to set up AmiTCP and install again.")
  38. (
  39. (run "delete t:AmiSlate.AppendMeToServices QUIET")
  40.  
  41. (textfile
  42.     (prompt "If you plan to be running AmiSlate in conjunction with AmiTCP, the line:\n\nAmiSlate      2955/tcp\n\nneeds to be present in your amitcp:db/services file.  Do you wish me to append this line to that file?\n\n(Note: this does not check to see if the line is already in the file!  If you've installed AmiSlate before, skip this part)")
  43.     (help "Including this line in your amitcp:db/services file tells AmiTCP's inet daemon that all requests on port 2955 should be sent to the AmiSlate program for further processing.  If this line is not included, you will not be able to receive AmiSlate requests from other people.")
  44.     (dest "t:AmiSlate.AppendMeToServices")
  45.     (append "\nAmiSlate    2955/tcp\n")
  46.     (confirm)
  47. )
  48.  
  49.  
  50. (set AddServiceString ("join amitcp:db/services t:AmiSlate.AppendMeToServices as t:AmiSlate.Temp1"))
  51. (set UpdateServiceString ("copy t:AmiSlate.Temp1 amitcp:db/services"))
  52.  
  53. (if (exists "t:AmiSlate.AppendMeToServices")
  54.     ((run AddServiceString)
  55.      (run UpdateServiceString)
  56.      (run "delete t:AmiSlate.Temp1")
  57.      (run "delete t:AmiSlate.AppendMeToServices")
  58.     )
  59. )
  60.     
  61.  
  62. (set ExecFile (tackon NewDir "AmiSlate"))
  63. (set InetDString (cat "AmiSlate stream tcp nowait root " ExecFile))
  64. (set InetDPrompt ("Also, if you plan to be running AmiSlate in conjunction with AmiTCP, the line:\n\n%s\n\nneeds to be present in your amitcp:db/inetd.conf file.  Do you wish me to append this line to that file?  (Note: this does not check to see if the line is already in the file!  If you've installed AmiSlate before, skip this part)" InetDString))
  65.  
  66. (set InternalInetString (cat "\nAmiSlate    stream      tcp nowait root    " ExecFile))
  67.  
  68. (run "delete t:AmiSlate.AppendMeToInetD QUIET")
  69.  
  70. (textfile
  71.     (prompt InetDPrompt)
  72.     (help "Including this line in your amitcp:db/inetd.conf file tells AmiTCP which program to run whenever it gets an AmiTCP request.  It is important that the file path and name in this line reflect the location of the AmiSlate executable.")
  73.     (dest "t:AmiSlate.AppendMeToInetD")
  74.     (append InternalInetString)
  75.     (confirm)
  76. )
  77.  
  78. (set AddInetString ("join amitcp:db/inetd.conf t:AmiSlate.AppendMeToInetD as t:AmiSlate.Temp2"))
  79. (set UpdateInetString ("copy t:AmiSlate.Temp2 amitcp:db/inetd.conf"))
  80.  
  81. (if (exists "t:AmiSlate.AppendMeToInetD")
  82.     ((run AddInetString)
  83.      (run UpdateInetString)
  84.      (run "delete t:AmiSlate.Temp2")
  85.      (run "delete t:AmiSlate.AppendMeToInetD")
  86.     )
  87. )
  88. ))
  89.  
  90. (message "\n\nAmiSlate is now installed.  If AmiTCP is currently running, make sure you restart AmiTCP before running AmiSlate.")
  91.  
  92.